package ap.project.controller.service;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class GameResources {
	
	private Bitmap joystick;
	private Bitmap joystickBg;
	private Bitmap shootButton;
	private Bitmap shootButtonPushed;
	private Bitmap powerUp1;
	private Bitmap powerUp2;
	private Bitmap powerUp3;
	private Bitmap healthbg;
	private Bitmap namebg;
	private Bitmap hearth;

	/**
	 * Sets resources to a bitmap using the Resources objet
	 * 
	 * @param res - The resource to be decoded
	 *
	 */
	public GameResources(Resources res) {
		joystick = (Bitmap)BitmapFactory.decodeResource(res, ap.project.controller.main.R.drawable.movejoystick);
		joystickBg = (Bitmap)BitmapFactory.decodeResource(res, ap.project.controller.main.R.drawable.joystickbg);
		shootButton = (Bitmap)BitmapFactory.decodeResource(res, ap.project.controller.main.R.drawable.buttonnormal);
		shootButtonPushed = (Bitmap)BitmapFactory.decodeResource(res, ap.project.controller.main.R.drawable.buttonpushed);
		powerUp1 = (Bitmap)BitmapFactory.decodeResource(res, ap.project.controller.main.R.drawable.powerup1);
		powerUp2 = (Bitmap)BitmapFactory.decodeResource(res, ap.project.controller.main.R.drawable.powerup2);
		powerUp3 = (Bitmap)BitmapFactory.decodeResource(res, ap.project.controller.main.R.drawable.powerup3);
		healthbg = (Bitmap)BitmapFactory.decodeResource(res, ap.project.controller.main.R.drawable.healthbg);
		namebg = (Bitmap)BitmapFactory.decodeResource(res, ap.project.controller.main.R.drawable.namebg);
		hearth = (Bitmap)BitmapFactory.decodeResource(res, ap.project.controller.main.R.drawable.hearth);
	}
	
	public Bitmap getHearth() {
		return hearth;
	}

	public Bitmap getButtonShoot(){
		return shootButtonPushed;
	}
	public int getJoystickBgWidth() { 
		return joystickBg.getWidth();
	}
	public Bitmap getHealthBg() {
		return healthbg;
	}
	public Bitmap getNameBg() {
		return namebg;
	}
	
	public Bitmap get_joystick() {
		return joystick;
	}
	
	public Bitmap getPowerUp1() {
		return powerUp1;
	}
	
	public Bitmap getPowerUp2() {
		return powerUp2;
	}
	
	public Bitmap getPowerUp3() {
		return powerUp3;
	}
	
	public Bitmap get_shootButton(){
		return shootButton;		
	}
	
	/**
	 * Change button image
	 * 
	 * @param shootbutton
	 */
	public void set_shootButton(Bitmap shootbutton) {
		this.shootButton = shootbutton;
	}

	/**
	 * Change joystick image
	 * 
	 * @param joystick
	 */
	public void set_joystick(Bitmap joystick) {
		this.joystick = joystick;
	}

	public Bitmap get_joystickBg() {
		return joystickBg;
	}

}
